package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceContractPremiumRealMapper;
import com.ruoyi.ctcx.domain.TbInsuranceContractPremiumReal;
import com.ruoyi.ctcx.service.ITbInsuranceContractPremiumRealService;

/**
 * 保险合同实际回款Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
@Service
public class TbInsuranceContractPremiumRealServiceImpl implements ITbInsuranceContractPremiumRealService 
{
    @Autowired
    private TbInsuranceContractPremiumRealMapper tbInsuranceContractPremiumRealMapper;

    /**
     * 查询保险合同实际回款
     * 
     * @param id 保险合同实际回款主键
     * @return 保险合同实际回款
     */
    @Override
    public TbInsuranceContractPremiumReal selectTbInsuranceContractPremiumRealById(Long id)
    {
        return tbInsuranceContractPremiumRealMapper.selectTbInsuranceContractPremiumRealById(id);
    }

    /**
     * 查询保险合同实际回款列表
     * 
     * @param tbInsuranceContractPremiumReal 保险合同实际回款
     * @return 保险合同实际回款
     */
    @Override
    public List<TbInsuranceContractPremiumReal> selectTbInsuranceContractPremiumRealList(TbInsuranceContractPremiumReal tbInsuranceContractPremiumReal)
    {
        return tbInsuranceContractPremiumRealMapper.selectTbInsuranceContractPremiumRealList(tbInsuranceContractPremiumReal);
    }

    /**
     * 新增保险合同实际回款
     * 
     * @param tbInsuranceContractPremiumReal 保险合同实际回款
     * @return 结果
     */
    @Override
    public int insertTbInsuranceContractPremiumReal(TbInsuranceContractPremiumReal tbInsuranceContractPremiumReal)
    {
        tbInsuranceContractPremiumReal.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceContractPremiumRealMapper.insertTbInsuranceContractPremiumReal(tbInsuranceContractPremiumReal);
    }

    /**
     * 修改保险合同实际回款
     * 
     * @param tbInsuranceContractPremiumReal 保险合同实际回款
     * @return 结果
     */
    @Override
    public int updateTbInsuranceContractPremiumReal(TbInsuranceContractPremiumReal tbInsuranceContractPremiumReal)
    {
        tbInsuranceContractPremiumReal.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceContractPremiumRealMapper.updateTbInsuranceContractPremiumReal(tbInsuranceContractPremiumReal);
    }

    /**
     * 批量删除保险合同实际回款
     * 
     * @param ids 需要删除的保险合同实际回款主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractPremiumRealByIds(Long[] ids)
    {
        return tbInsuranceContractPremiumRealMapper.deleteTbInsuranceContractPremiumRealByIds(ids);
    }

    /**
     * 删除保险合同实际回款信息
     * 
     * @param id 保险合同实际回款主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractPremiumRealById(Long id)
    {
        return tbInsuranceContractPremiumRealMapper.deleteTbInsuranceContractPremiumRealById(id);
    }
}
